home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / tm4dhost.zip / TM4DHCFG.SCR < prev    next >
Text File  |  1993-11-27  |  11KB  |  340 lines

  1. ; Original Host Config Script done by "Tsung Hu".
  2. ;
  3. ; THIS SCRIPT IS COPYRIGHT by "ED KAPUSCINSKI JR".
  4. ;
  5. ; It's new Name should read "TM4dHCFG.SCR".
  6. ; There are now "Nine" Levels of Security to select from!
  7. ;
  8. ; The script files that run the show in this host have had their names
  9. ; changed along with there code. (Hconfig.hst) = (TM4d_CFG.HST)
  10. ; (HOST.SCR) = (TM4dHOST.SCR), (Hconfig.scr) = (TM4dHCFG.scr)
  11. ; (HUSER.HST) = (TM4dPASS.HST). And thier Menus also.
  12. ; This was done so as not to cause confusion in having (Two Host) in the 
  13. ; Same directory. That's right, You can NOW have both.
  14. ;
  15. ; Like in the Tm4dhost script, Everything that was changed is
  16. ; marked with an * asterisk in the comment line like the ones below.
  17. ;
  18. NEWUSER = 1                  ; * Upload command not availible here
  19. TMUSER = 2                   ; * Upload command is availible here
  20. SILVER = 3                   ; * To use these alternate levels.
  21. GOLD = 4                     ; * Assign them to the caller in the
  22. LEVEL5 = 5                   ; * file "Huser.hst" as his "UserLevel"
  23. LEVEL6 = 6                   ; * From then on, He, the user will see that
  24. LEVEL7 = 7                   ; * Menu and not the TmUser Menu.
  25. LEVEL8 = 8                   ; * That's all there's to it.
  26. SYSOP = 9                    ; * New Sysop Level Now 9
  27. DETECTBAUD = 1               ; set to 0 if COM baud rate is locked
  28. query baud,INITIALBAUD       ; initial baud rate (highest baud rate)
  29. YELLTIME = 3                 ; amount of time to display the alarm
  30. YELLSOUND = 1                ; amount of time to ring the alarm
  31. query dirtelemate,HOSTDIR    ; directory holding *.HST
  32. query dirupload,DOWNLOADDIR  ; host download directory
  33. query dirdownload,UPLOADDIR  ; host upload directory
  34. CLOSESYSTEM = 0              ; set to 1 if close system
  35.  
  36. COMPORT = "1"
  37. ; * ----------- Procedure Break --------------
  38.    procedure Pause
  39.    string ch
  40.    print
  41.    print "Press [Enter] to continue ",
  42.    repeat
  43.       inputch ch
  44.    until success
  45.    print
  46.    print
  47.    endproc
  48. ; * ----------- Procedure Break --------------
  49. open "HSHELL.BAT"            ; [S]hell batch file
  50. if not success
  51.    print
  52.    print
  53.    print "Which COM port is your modem connected to  (1-8) ?   COM",
  54.    repeat
  55.      inputch COMPORT
  56.      if success
  57.         print COMPORT
  58.         strpos "12345678",COMPORT,pos
  59.         if pos=0
  60.            print "Which COM port is your modem connected to  (1-8) ?   COM",
  61.         endif
  62.      endif
  63.    until success and pos>0
  64.    print
  65.    if COMPORT<>"1" and COMPORT<>"2"
  66.       print "Due to DOS limit, only COM1 and COM2 is supported for"
  67.       print "the [S]hell command in host mode.  However, you may"
  68.       print "create your own HSHELL.BAT and use a third-party program,"
  69.       print "such as DOORWAY, which allows you to use COM",COMPORT
  70.    else
  71.       create "HSHELL.BAT"
  72.       if success
  73.          print "Creating HSHELL.BAT, the batch file for [S]hell command"
  74.          write "CTTY COM",COMPORT
  75.          write "COMMAND"
  76.          write "CTTY CON"
  77.          write "EXIT"
  78.          close
  79.       else
  80.          print "Cannot to create HSHELL.BAT"
  81.       endif
  82.    endif
  83.    Pause
  84. else
  85.    close                     ; already exist, skip it
  86. endif
  87.  
  88. open "TM4d_CFG.HST"
  89. string s
  90. if success
  91.    read s
  92.    atoi s,NEWUSER            ; new user level
  93.    read s
  94.    atoi s,TMUSER             ; * MAIN MENU
  95.    read s                    ; *
  96.    atoi s,SILVER             ; * Alternate levels can be used as sub-menus
  97.    read s                    ; * by assigning a userlevel to a perticular menu.
  98.    atoi s,GOLD               ; * Then calling that userlevel from One of other menu's
  99.    read s                    ; * as an option. They can also be assigned to other Scripts.
  100.    atoi s,LEVEL5             ; * The "Power" of this Host Script is not known yet. Since it has
  101.    read s                    ; * so many levels of Security. The Sysop can do anything that he
  102.    atoi s,LEVEL6             ; * wishes to.
  103.    read s                    ; *
  104.    atoi s,LEVEL7             ; *
  105.    read s                    ; *
  106.    atoi s,LEVEL8             ; *
  107.    read s                    ; *
  108.    atoi s,SYSOP              ; * New sysop level
  109.    read s                    ;
  110.    atoi s,DETECTBAUD         ; detect baud rate
  111.    read s
  112.    atoi s,INITIALBAUD        ; initial baud rate
  113.    read s
  114.    atoi s,YELLTIME           ; yell time
  115.    read s
  116.    atoi s,YELLSOUND          ; yell sound
  117.    read HOSTDIR              ; directory containing H*.HST
  118.    read DOWNLOADDIR          ; download directory
  119.    read UPLOADDIR            ; upload directory
  120.    read s
  121.    atoi s,CLOSESYSTEM        ; open or close system
  122.    close
  123. endif
  124.  
  125. finish = 0
  126. while not finish
  127.    clear text
  128.    print "A: TeleMate New User   : ",NEWUSER        ; *
  129.    print "B: TeleMate Main Menu  : ",TMUSER         ; *   This is the standard menu
  130.    print "C: TeleMate Silver     : ",SILVER         ; *   Name these alternate
  131.    print "D: TeleMate Gold       : ",GOLD           ; *   levels according to
  132.    print "E: TeleMate Level 5    : ",LEVEL5         ; *   use, Util for utils
  133.    print "F: TeleMate Level 6    : ",LEVEL6         ; *   or Wendy just for her!
  134.    print "G: TeleMate Level 7    : ",LEVEL7         ; *   They can also be assigned
  135.    print "H: TeleMate Level 8    : ",LEVEL8         ; *   to scripts which have many levels
  136.    print "I: Telemate SySop      : ",SYSOP          ; *
  137.    print "J: Detect Baud Rate    : ",
  138.    if DETECTBAUD
  139.       print "ON"
  140.    else
  141.       print "OFF"
  142.    endif
  143.    print "K: Initial Baud Rate   : ",INITIALBAUD
  144.    print "L: Yell Time           : ",YELLTIME," seconds"
  145.    print "M: Yell Sound          : ",YELLSOUND," seconds"
  146.    print "N: Host Directory      : ",HOSTDIR
  147.    print "O: Download Directory  : ",DOWNLOADDIR
  148.    print "P: Upload Directory    : ",UPLOADDIR
  149.    print "R: Close System        : ",
  150.    if CLOSESYSTEM
  151.       print "ON"
  152.    else
  153.       print "OFF"
  154.    endif
  155.    print "   ------------------------------------"   ; *
  156.    print "S: Save Configuration and Run Host Mode"
  157.    print "Q: Abort Configuration"
  158.    print "   ------------------------------------"   ; *
  159.    print "Which option: ",
  160.    repeat
  161.       inputch ch
  162.    until success
  163.    print ch
  164.    print
  165.  
  166.    switch ch
  167.       case "A":
  168.          print "Enter New User Security Level: ",     ; *
  169.          input s
  170.          ss = ""
  171.          concat ss,s
  172.          if ss<>""
  173.             atoi ss,NEWUSER
  174.          endif
  175.       case "B":
  176.          print "Enter Main Menu Security Level: ",      ; *
  177.          input s
  178.          ss = ""
  179.          concat ss,s
  180.          if ss<>""
  181.             atoi ss,TMUSER
  182.          endif
  183.       case "C":
  184.          print "Enter Silver Security Level: ",        ; *
  185.          input s
  186.          ss = ""
  187.          concat ss,s
  188.          if ss<>""
  189.             atoi ss,SILVER
  190.          endif
  191.       case "D":
  192.          print "Enter Gold Security Level: ",        ; *
  193.          input s
  194.          ss = ""
  195.          concat ss,s
  196.          if ss<>""
  197.             atoi ss,GOLD
  198.          endif
  199.       case "E":
  200.          print "Enter Level 5 Security Level: ",        ; *
  201.          input s
  202.          ss = ""
  203.          concat ss,s
  204.          if ss<>""
  205.             atoi ss,LEVEL5
  206.          endif
  207.       case "F":
  208.          print "Enter Level 6 Security Level: ",        ; *
  209.          input s
  210.          ss = ""
  211.          concat ss,s
  212.          if ss<>""
  213.             atoi ss,LEVEL6
  214.          endif
  215.       case "G":
  216.          print "Enter Level 7 Security Level: ",        ; *
  217.          input s
  218.          ss = ""
  219.          concat ss,s
  220.          if ss<>""
  221.             atoi ss,LEVEL7
  222.          endif
  223.       case "H":
  224.          print "Enter Level 8 Security Level: ",        ; *
  225.          input s
  226.          ss = ""
  227.          concat ss,s
  228.          if ss<>""
  229.             atoi ss,LEVEL8
  230.          endif
  231.       case "I":
  232.          print "Enter SYSOP Security Level: ",         ; *
  233.          input s
  234.          ss = ""
  235.          concat ss,s
  236.          if ss<>""
  237.             atoi ss,SYSOP
  238.          endif
  239.       case "J":
  240.          DETECTBAUD = not DETECTBAUD
  241.       case "K":
  242.          print "Enter initial baud rate: ",
  243.          input s
  244.          ss = ""
  245.          concat ss,s
  246.          if ss<>""
  247.             atoi ss,baud
  248.          endif
  249.          switch baud
  250.             case   300: INITIALBAUD = baud
  251.             case  1200: INITIALBAUD = baud
  252.             case  2400: INITIALBAUD = baud
  253.             case  4800: INITIALBAUD = baud
  254.             case  9600: INITIALBAUD = baud
  255.             case 19200: INITIALBAUD = baud
  256.             case 38400: INITIALBAUD = baud            ; *
  257.             otherwise : print
  258.                         print "Invalid value"
  259.                         print
  260.                         Pause
  261.          endswitch
  262.       case "L":
  263.          print "Enter yell time (0 to turn off): ",
  264.          input s
  265.          ss = ""
  266.          concat ss,s
  267.          if ss<>""
  268.             atoi ss,YELLTIME
  269.          endif
  270.       case "M":
  271.          print "Enter yell sound length (0 to turn off): ",
  272.          input s
  273.          ss = ""
  274.          concat ss,s
  275.          if ss<>""
  276.             atoi ss,YELLSOUND
  277.          endif
  278.       case "N":
  279.          print "Enter Host directory which contains *.HST: ",
  280.          input s
  281.          ss = ""
  282.          concat ss,s
  283.          if ss<>""
  284.             HOSTDIR = ss
  285.          endif
  286.       case "O":
  287.          print "Enter host download directory: ",     ; * in future try to add
  288.          input s                                      ; * directory just for host
  289.          ss = ""                                      ; * u/l * d/l files.
  290.          concat ss,s
  291.          if ss<>""
  292.             DOWNLOADDIR = ss
  293.          endif
  294.       case "P":
  295.          print "Enter host upload directory: ",
  296.          input s
  297.          ss = ""
  298.          concat ss,s
  299.          if ss<>""
  300.             UPLOADDIR = ss
  301.          endif
  302.       case "R":
  303.      CLOSESYSTEM = not CLOSESYSTEM
  304.       case "S":
  305.          delete "TM4d_CFG.HST"
  306.          create "TM4d_CFG.HST"
  307.          if not success
  308.             print "Cannot create TM4d_CFG.HST"
  309.             print "Configuration aborted"
  310.             finish = 1
  311.          else
  312.             write NEWUSER
  313.             write TMUSER                              ; *
  314.             write SILVER                              ; *
  315.             write GOLD                                ; *
  316.             write LEVEL5                              ; *
  317.             write LEVEL6                              ; *
  318.             write LEVEL7                              ; *
  319.             write LEVEL8                              ; *
  320.             write SYSOP                               ; *
  321.             write DETECTBAUD
  322.             write INITIALBAUD
  323.             write YELLTIME
  324.             write YELLSOUND
  325.             write HOSTDIR
  326.             write DOWNLOADDIR
  327.             write UPLOADDIR
  328.         write CLOSESYSTEM
  329.         close
  330.             print "Configuration completed"
  331.             Pause
  332.             print "Starting host mode"
  333.             script "TM4dHOST"
  334.          endif
  335.       case "Q":
  336.          print "Configuration aborted"
  337.          finish = 1
  338.    endswitch
  339. endwhile
  340.